package com.huashi.dealer.modular.business.goods.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * API商品请求参数
 *
 * @author 谭陈强
 * @since 2025-07-30
 */
@Data
@Schema(description = "API商品请求参数")
public class GoodsRequestParam {

    @Schema(description = "用户令牌")
    private String token;

    @Schema(description = "商品ID")
    private Long goodsId;

    @Schema(description = "商品分类ID")
    private Long categoryId;

    @Schema(description = "搜索关键词")
    private String search;

    @Schema(description = "条形码")
    private String barCode;

    @Schema(description = "是否新品：10是，20否")
    private Integer isNewProduct;

    @Schema(description = "是否爆款：10是，20否")
    private Integer isHotSellingItem;

    @Schema(description = "页码")
    private Integer page;

    @Schema(description = "每页数量")
    private Integer listRows;

    @Schema(description = "限制数量")
    private Integer limit;

    @Schema(description = "商品名称")
    private String goodsName;

    @Schema(description = "商品卖点")
    private String sellingPoint;

    @Schema(description = "商品规格：10单规格，20多规格")
    private Integer specType;

    @Schema(description = "库存计算方式：10下单减库存，20付款减库存")
    private Integer deductStockType;

    @Schema(description = "商品排序")
    private Integer goodsSort;

    @Schema(description = "配送模板ID")
    private Long deliveryId;

    @Schema(description = "是否开启积分赠送：1开启，0关闭")
    private Integer isPointsGift;

    @Schema(description = "是否允许使用积分抵扣：1允许，0不允许")
    private Integer isPointsDiscount;

    @Schema(description = "是否开启等级权益：1开启，0关闭")
    private Integer isEnableGrade;

    @Schema(description = "是否独立等级权益：1是，0否")
    private Integer isAloneGrade;

    @Schema(description = "独立等级权益")
    private String aloneGradeEquity;

    @Schema(description = "是否独立经销商：1是，0否")
    private Integer isIndDealer;

    @Schema(description = "经销商金额类型")
    private Integer dealerMoneyType;

    @Schema(description = "一级金额")
    private BigDecimal firstMoney;

    @Schema(description = "二级金额")
    private BigDecimal secondMoney;

    @Schema(description = "三级金额")
    private BigDecimal thirdMoney;

    @Schema(description = "商品状态")
    private Integer goodsStatus;

    @Schema(description = "商品类型")
    private Integer isType;

    @Schema(description = "商品图片")
    private String goodsImage;

    @Schema(description = "商品内容")
    private String content;

    @Schema(description = "商品SKU列表")
    private List<GoodsSkuParam> goodsSkuList;

    @Schema(description = "商品图片列表")
    private List<String> goodsImageList;

    @Data
    @Schema(description = "商品SKU参数")
    public static class GoodsSkuParam {
        @Schema(description = "SKU ID")
        private Long goodsSkuId;

        @Schema(description = "SKU名称")
        private String skuName;

        @Schema(description = "SKU规格")
        private String skuSpec;

        @Schema(description = "SKU价格")
        private BigDecimal skuPrice;

        @Schema(description = "SKU库存")
        private Integer skuStock;

        @Schema(description = "SKU图片")
        private String skuImage;

        @Schema(description = "SKU重量")
        private BigDecimal skuWeight;

        @Schema(description = "SKU编码")
        private String skuCode;
    }
} 